package com.wjy.icu.common.utils;


import com.wjy.icu.common.utils.security.Md5Utils;
import com.wjy.icu.domain.Icuuser;

public class PasswordUtil
{
    public static String encryptPassword(String username, String password, String salt)
    {
        return Md5Utils.hash(username + password + salt);
    }
    public static boolean matches(Icuuser user, String newPassword)
    {
        return user.getPassward().equals(encryptPassword(user.getTel(), newPassword, user.getSalt()));
    }

}